package emulator.unittest.hardware.nmos6502.commands;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import emulator.EmulatorException;
import emulator.hardware.HwByte;
import emulator.hardware.nmos6502.Cpu6502;
import emulator.hardware.nmos6502.commands.STA;
import emulator.unittest.hardware.nmos6502.MockOperand;

public class STATest {

	@Test
	public void testExecute() throws EmulatorException {
		int target = 0x8A;
		Cpu6502 cpu = new Cpu6502();
		cpu.setAccu(new HwByte(target));
		MockOperand operand = new MockOperand(0);
		new STA().execute(cpu, operand);
		assertEquals(new HwByte(target), operand.getByte());
	}

}
